﻿using System.Collections.Generic;
using System.Collections;
using System.Web;
using System.Web.SessionState;
using iSun.Common;
using iSun.Model;
using iSun.BLL;

namespace iSun.Web.UI.Controls
{
    public class DojoMenuData  : JsonData, IHttpHandler, IRequiresSessionState
    {
        #region 菜单数据
        public bool IsReusable
        {
            // Return false in case your Managed Handler cannot be reused for another request.
            // Usually this would be false in case you have some state information preserved per request.
            get { return true; }
        }

        public void ProcessRequest(HttpContext context)
        {
            string _table = GetStringFromQueryString("table", "");
            System.Guid _pid = GetGuidFromQueryString("pid");
            BTreeView bTreeView = new BTreeView();
            context.Response.Write(bTreeView.ConvertToDojoJSON(bTreeView.getMenuTreeView(_pid)));
        }
        #endregion  
    }
}
